package com.heakey.common.enums;

import com.heakey.common.constant.CommonConstant;
import com.heakey.common.iface.IErrorCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 错误码枚举
 * @Author Bing
 * @Date 2024/10/10 14:29
 */
@Getter
@AllArgsConstructor
public enum BaseErrorCodeEnum implements IErrorCode {

    ERROR(CommonConstant.DEFAULT_ERROR_CODE, "服务器内部错误"),

    PARAM_ERROR(400, "参数错误"),

    NOT_FOUND(404, "资源不存在"),

    METHOD_NOT_ALLOWED(405, "请求方法不允许"),

    UNAUTHORIZED(401, "未授权"),

    FORBIDDEN(403, "禁止访问"),

    NOT_ACCEPTABLE(406, "请求头信息不匹配"),

    REQUEST_TIMEOUT(408, "请求超时"),

    TOO_MANY_REQUESTS(429, "请求次数过多"),

    ACTION_FREQUENT(5000,"请勿重复请求"),

    USER_NOT_EXIST(5001,"用户不存在"),

    VERIFICATION_CODE_ERROR(5003,"验证码错误"),

    DATA_NOT_EXIST(5002,"数据不存在"),

    DATA_NOT_AUTH(5004,"数据未授权"),

    WORK_BUSY(5005,"工作繁忙，请稍后再试"),

    CUSTOMER_ID_NOTNULL(5006,"客户id不能为空"),

    DATA_STATUS_ERROR(5007,"数据状态错误"),

    FILE_NOT_EXIST(5008,"文件不存在"),

    FILE_TYPE_ERROR(5009,"文件类型错误"),

    FILE_SIZE_ERROR(5010,"文件大小错误"),

    FILE_SIZE_LIMIT_ERROR(5011,"文件不能大于%sM"),

    TO_COMPLETE_USER_INFO(5012,"请先完善用户信息"),

    OPTION_BUSY(5016,"操作频繁，请稍后再试"),

    COUNT_LIMT(5017,"次数超过限制，请稍后再试"),

    PHONE_IS_ERROR(5022,"手机号格式有误"),

    CONFIG_ERROR(5023,"配置错误"),

    BALANCE_NOT_ENOUGH(5024,"您当前余额为%s，不足本次消费，赶紧去充值吧!"),

    ORDER_IS_END(5025,"订单已结束"),

    MOBILE_NOT_MATCH(5026,"手机号不匹配"),

    CAR_IS_BUSY(5027,"很抱歉，当前车辆已被他人抢先一步了，请更换其他车辆吧~"),
    ;

    private int code;

    private String message;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}